package AuxComp;

import asa.*;

import java.util.*;

public class SymbolTable {

    public SymbolTable() {
    	localVariableTable = new Hashtable<String, Variable>();
    	staticVariableTable = new Hashtable<String, Variable>();
   }

    public Variable putStatic( String name, Variable v) {
       return staticVariableTable.put(name, v);
    }

    public Variable put( String name, Variable v) {
        return localVariableTable.put(name, v);
     }

    public Variable getStatic( String name ) {
       return staticVariableTable.get(name);
    }

    public Variable get( String name ) {
        return localVariableTable.get(name);
     }

    public Hashtable<String, Variable> getLocalVariableTable() {
    	return localVariableTable;
    }

    public Hashtable<String, Variable> getStaticVariableTable() {
    	return staticVariableTable;
    }

    private Hashtable<String, Variable> localVariableTable, staticVariableTable;
}
